package com.gvfish.backingbean.admin;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;

@ManagedBean
@RequestScoped
public class Right {
	private String ip;

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getIp() {
		 HttpServletRequest request=(HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();   
		 ip = request.getRemoteAddr();
		return ip;
	}
}
